import request from "@/utils/request";

// 新增项目管理
export function getAddManage(data) {
  return request({
    url: "/management",
    method: "post",
    data: data,
  });
}
// 查询项目列表
export function getManageList(data) {
  return request({
    url: "/management/list",
    method: "get",
    params: data,
  });
}
// 查询项目列表详情
export function getManageDetails(data) {
  return request({
    url: "/management/" + data,
    method: "get",
  });
}
//查询机构列表
export function getManagement(data) {
  return request({
    url: "/web/management/listNoPage",
    method: "get",
    params: data,
  });
}
//转第三方
export function getTurnToThress(data) {
  return request({
    url:
      "/system/task/exchangeThird?taskName=" +
      data.taskName +
      "&ormId=" +
      data.ormId +
      "&proId=" +
      data.proid,
    method: "put",
    // params:data
  });
}
//会议详情
export function getMetting(data) {
  return request({
    url: "/system/task/reviewTaskVo/" + data,
    method: "get",
    // params:data
  });
}
// 审核
export function getApprovalAdd(data) {
  return request({
    url: "/web/approval/add",
    method: "post",
    data: data,
  });
}
//在线预审
export function getOnLinePreliminary(data) {
  return request({
    url: "/web/approval/onLinePreliminary",
    method: "get",
    params: data,
  });
}
// 抽取专家
export function getBeginExtract(data) {
  return request({
    url: "/extractRule/beginExtract",
    method: "post",
    data: data,
  });
}
// 抽取专家重新更换查询专家信息
export function getExchangeExpert(data) {
  return request({
    url: "/extractRule/selectExchangeExpert",
    method: "get",
    params: data,
  });
}
// 抽取专家确认更换专家
export function getConfirmChange(data) {
  return request({
    url: "/extractRule/exchangeExpertAssign",
    method: "put",
    data: data,
  });
}
// 抽取专家(修改规则)确认更换专家
export function getModifyRule(data) {
  return request({
    url: "/extractRule/updateRuleExchangeExpert",
    method: "post",
    data: data,
  });
}
// 指定专家查询未抽取的专家列表
export function getUnextractedExpert(data) {
  return request({
    url: "/extractRule/exchangeExpertAssignList/" + data,
    method: "get",
    // params: data,
  });
}
// 项目管理 项目状态下拉框数据
// export function getUnextractedExpert(data) {
//   return request({
//     url: "/extractRule/exchangeExpertAssignList/" + data,
//     method: "get",
//     // params: data,
//   });
// }

//删除项目管理
export function getDelete(data) {
  return request({
    url: "/management/" + data,
    method: "delete",
    // data:data
  });
}
// 获取专家评审列表
export function getExpertList(data) {
  return request({
    url: "/system/task/expertList",
    method: "get",
    params: data,
  });
}
// 获取专家评审列表
export function getUpdata(data) {
  return request({
    url: "/system/task/dealWith",
    method: "put",
    params: data,
  });
}
// 获取专家评审方案详情
export function getExpertDetails(reviewTaskId, expertId) {
  return request({
    url: `/system/task/expert/${reviewTaskId}?expertId=${expertId}`,
    method: "get",
    // params:data
  });
}
// 获取专家抽取监控列表
export function getExpertExtractMonito(data) {
  return request({
    url: "/monitoring/list",
    method: "get",
    params: data,
  });
}
// 获取专家抽取监控抽取单位
export function getExtractUnit(data) {
  return request({
    url: "/expertExtractMonitor/extractUnit",
    method: "get",
    params: data,
  });
}
// 获取专家抽取监控详情
export function getExtractUnitDetails(reviewTaskId,data) {
  return request({
    url: "/expertExtractMonitor/" + reviewTaskId,
    method: "get",
    params:data
  });
}
//专家抽取管理详情
export function getExtractManageDetails(data) {
  return request({
    url: "/system/task/detailByPro/" + data,
    method: "get",
    // params:data
  });
}
//评审专家处理任务
export function getDetailByTask(data) {
  return request({
    url: "/system/task/detailByTask/" + data,
    method: "get",
    // params:data
  });
}
//专家抽取管理查询详情
export function getDetailTask(data) {
  return request({
    url: "/system/task/detailTask/" + data,
    method: "get",
    // params:data
  });
}
//删除专家评审任务
export function getExtractDelete(data) {
  return request({
    url: "/system/task/delete" ,
    method: "delete",
    params:data
  });
}
//查询专家是否接受任务
export function getExtReceiveInfo(reviewTaskId, expertId) {
  return request({
    url: `/system/task/expertReceiveInfo/${reviewTaskId}?expertId=${expertId} `,
    method: "get",
    // params:data
  });
}
//申请取消操作
export function getApplyCancel(data) {
  return request({
    url: "/system/task/applyCancel",
    method: "put",
    params: data,
  });
}
//查询抽取专家选择专家列表
export function getExtInfoList(data) {
  return request({
    url: "/web/sheet/queryList",
    method: "get",
    params: data,
  });
}
//获取项目单位
export function getApplyCompany(data) {
  return request({
    url: "/management/applyCompany",
    method: "get",
    params: data,
  });
}
//获取专家登录账号专家id
export function getExpertId(data) {
  return request({
    url: "/web/sheet/getInfoByUserId",
    method: "get",
    params: data,
  });
}
//安排评审会议
export function getArrangeMeeting(data) {
  return request({
    url: "/system/task/edit",
    method: "get",
    params: data,
  });
}

// 查询时间
export function getTime(id) {
  return request({
    url: "/lastCheck/getLastCheckCreateTime/" + id,
    method: "get",
  });
}
//专家抽取管理详情页 ---审批获取专家信息
export function getExtractExpert(id) {
  return request({
    url: "/extractExpert/" + id,
    method: "get",
  });
}
//专家抽取管理详情页 ---申请去下审批
export function getExtractExpertApproval(data) {
  return request({
    url: "/extractExpert/approval",
    method: "put",
    params:data
  });
}
//专家抽取管理 ---待评价
export function getbatchUpdate(data,id) {
  return request({
    url: "/extractExpert/batchUpdate/"+ id,
    method: "put",
    data:data
  });
}
//项目管理详情页-----绩效考评
  export function getScoreList(data) {
    return request({
      url: "/score/list/"+ data,
      method: "get",
      // data:data
    });
}
//查询 三方审批审核意见
export function getApprovalOpinion(data) {
  return request({
    url: "/web/approval/selectApprovalOpinion/"+ data,
    method: "get",
    // data:data
  });
}
// 查询 项目管理列表项目统计
export function getProjectCount(data) {
  return request({
    url: "/management/projectCount",
    method: "get",
    params:data
  });
}
// 查询 增加监控
export function geMonitoringAdd(data) {
  return request({
    url: "/monitoring/add",
    method: "post",
    data:data
  });
}

// 催办 通知项目单位
export function createMsg(proId,data) {
  return request({
    url:`/management/createMsg/${proId}`,
    method: "get",
    params:data
  })
}

// 指定专家list(查询未抽取出来的专家)
export function getExtractRule(reviewTaskId,data) {
  return request({
    url:`/extractRule/${reviewTaskId}`,
    method: "get",
    params:data
  })
}

//大数据局-项目退回重申
export function getReturnRepeated(data) {
  return request({
    url:"/management/returnRepeated",
    method: "get",
    params:data
  })
}

// 现场论证删除文件
export function delFile(approvalId) {
  return request({
    url:"/management/deleteFile/" + approvalId,
    method: "delete",
  })
}

// 现场论证上传文件
export function getFile(approvalId,data) {
  return request({
    url:"/management/uploadPorFile/" + approvalId,
    method: "post",
    data:data
  })
}

// 查看 三方意见汇总的审核意见
export function getThreeApprovalOpinion(proId) {
  return request({
    url: "/management/getApprovalOpinion/"+ proId,
    method: "get",
  });
}